<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>选择器</title>
    <script src="../js/jquery-3.4.1.js"></script>
    <script>
        //1.入口函数
        /*$(function () {
            console.log($("#image"))
            console.log($("#image").height())
        })
        window.onload=function (ev) {
            console.log("加载1")
            var image=document.getElementById("image");
            console.log(image.height)
        };*/
       /* window.onload=function (ev) {
            console.log("加载2")

        };
        $(document).ready(function () {
            console.log(111)
        });
        jQuery(document).ready(function () {
            console.log(222)
        });*/
        //选择器

        $(function () {
           /* //1.基本选择器
            console.log($("#test,.image"))
            //2.属性选择器
            console.log($("input:text"))
            console.log($("[name*=p][type=password]"))
            //3.过滤选择器
            console.log($("input:first"))
            console.log($("input:even"))
            console.log($("input:gt(2)"))*/
            //4.层级选择器
            //console.log($("ul>li>ul:first-child").css("border", "3px solid blue"))
        })


    </script>
</head>
<body>
<p id="test"><span>这是段落</span><a href="http://www.baidu.com">超链接</a></p>
<input type="text" class="text0">
<input type="text" class="text1">
<input type="text" class="text2">
<input type="password" name="pwd">
<input type="submit">
<ul class="topnav">
    <li>Item 1</li>
    <li class="test">Item 2
        <ul ><li >Nested item 1</li><li>Nested item 2</li><li>Nested item 3</li></ul>
    </li>
    <li class="test">Item 3</li>
</ul>
<!--<img class="image" src="../images/jd.png">-->
</body>
</html>